import QtQuick 2.3
import QtGraphicalEffects 1.0
import "qrc:///content"
import "qrc:///Constants.js" as Constants

// http://tro.trola.org/wp/rounded-images-in-qtquickqml/

Item
{
    id: exhibitor

    width: 200
    height: 200
    antialiasing: true

    Rectangle
    {
        id: background
        anchors.fill: parent
        color: "transparent"
    }

    Image
    {
        id: exhibitorImage
        anchors.fill: parent
        source: "qrc:///images/exhibitor.jpg"
        fillMode: Image.PreserveAspectCrop
        visible: false
    }

    Rectangle
    {
        id: mask
        anchors { margins: 0 }
        color: "black"
        radius: 15
        anchors.fill: parent
        clip: true
        visible: false
    }

    OpacityMask
    {
       anchors.fill: mask
       source: exhibitorImage
       maskSource: mask
   }

    Rectangle
    {
        id: exhibitorTextBackground1
        y: 180
        color: "white"
        anchors.rightMargin: 0
        anchors.bottomMargin: exhibitorTextBackground.height / 2
        anchors.leftMargin: 0
        anchors.right: parent.right
        anchors.left: parent.left
        anchors.bottom: parent.bottom
        height: exhibitorTextBackground.height / 2
    }

    Rectangle
    {
        id: exhibitorTextBackground
        color: "white"
        anchors.right: parent.right
        anchors.rightMargin: 0
        anchors.left: parent.left
        anchors.leftMargin: 0
        anchors.bottom: parent.bottom
        height: 20
        radius: 15

        Text
        {
            id: exhibitorText
            text: "exhibitor text"
            anchors.leftMargin: 10
            anchors.fill: parent
            style: Text.Normal
            font.pointSize: 10
            verticalAlignment: Text.AlignVCenter
        }
    }
}
